<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<center>
		<a href="index.php">首页</a>
		<a href="login.html">登录</a>
		<a href="reg.html">注册</a>
		<hr>
		<form action="update.php" method="post">
		<?php
		require('include.php');

		$id = $_GET['id'];

		$data = $redis->hgetall("user:{$id}");
		?>
		<table border="1" width="500">
			<input type="hidden" name="id" value="<?php echo $id; ?>">
			<tr>
				<td>用户名</td>
				<td><input type="text" name="username" value="<?php echo $data['username']; ?>"></td>
			</tr>
			<tr>
				<td>年龄</td>
				<td><input type="text" name="age" value="<?php echo $data['age'];?>"></td>
			</tr>
			<tr>
				<td colspan="2"><input type="submit" value="提交"></td>
			</tr>
		</table>
		</form>
	</center>
</body>
</html>